#include <stdio.h>  
#include <math.h>  
  
typedef struct piont {  
    int x;  
    int y;  
} PT;  
  
typedef struct line {  
    PT *start;  
    PT *end;  
} LE;  
  
double lineLong(LE *line) {  
    double val = pow(line->end->x - line->start->x, 2) + pow(line->end->y - line->start->y, 2);  
    return sqrt(val);  
}  
  
int main() {  
    PT start_pt = {2, 2};  
    PT end_pt = {3, 4};  
    LE line = {&start_pt, &end_pt};  
    printf("line length is %lf\n", lineLong(&line));   
  
    return 0;  
}